package com.gxa.admin.exception;

import com.gxa.core.result.MessageCode;
import lombok.Data;

/**
 * @author lch
 * @date 2024/3/22 21:53
 * @description 自定义异常类
 **/
@Data
public class CustomException extends RuntimeException{

    private MessageCode messageCode;


    public CustomException(MessageCode messageCode){
        super(messageCode.getMsg());
        this.messageCode=messageCode;
    }


    public CustomException(String msg){
        super(msg);
    }

}
